<template>
	<view>
		<view>
			<image src="/static/images/reportManage.png" class="heard-location-icon"></image>
		</view>
		<view class="cu-list grid" :class="'col-2'">
			<view class="cu-item" @tap="toPage(9001);">
				<view :class="['cuIcon-text','text-red']"></view>
				<text>刑释人员跟进</text>
			</view>
			<view class="cu-item" @tap="toPage(9002);">
				<view :class="['cuIcon-copy','text-red']"></view>
				<text>吸毒人员跟进</text>
			</view>
			<view class="cu-item" @tap="toPage(9003);">
				<view :class="['cuIcon-copy','text-red']"></view>
				<text>矫正人员跟进</text>
			</view>
			<view class="cu-item" @tap="toPage(9004);">
				<view :class="['cuIcon-copy','text-red']"></view>
				<text>精神跟进人员跟进</text>
			</view>
			<view class="cu-item" @tap="toPage(9005);">
				<view :class="['cuIcon-copy','text-red']"></view>
				<text>艾滋病人员跟进</text>
			</view>
		</view>
	</view>
</template>

<script>
	import {queryLabelGovPerson} from '../../api/specialReportInfo/specialReportInfoApi.js';
	import {getUserTel,getUserName} from '../../api/user/userApi.js'
	export default {
		data() {
			return {
				communityName: '',
				communityId: '',
			};
		},
		/**
		 * 生命周期函数--监听页面加载
		 */
		onLoad: function(options) {
			this.vc.onLoad(options);
		},

		/**
		 * 用户点击右上角分享
		 */
		onShareAppMessage: function() {},
		methods: {
			toPage: function(a) {
				let _that = this;
				let flag = false;
				// 默认选择第一个
				let dataObj = {
					labelCd:a,
					personName: getUserName(),
					tel: getUserTel(),
					page: 1,
					row: 1
				};
				queryLabelGovPerson(dataObj).then(_data =>{
					let _json = _data;
					if (_json.code == 0 && _json.data.length > 0) {
						this.vc.navigateTo({
							url:'/pages/specialFollow/specialFollow?govPersonId='+_json.data[0].govPersonId +"&personName="+_json.data[0].personName
						},true)
					}else{
						uni.showToast({
							icon: 'none',
							title: '未查询到您的信息。'
						});
					}
				})
			},
			
		}
	};
</script>
<style>
	@import "./specialReportManage.css";
	text {
		text-align: center;
	}
</style>
